package d3_charset;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class t3OutoutStream {
    public static void main(String[] args) throws Exception {
//        OutputStream osw = new FileOutputStream("src\\111");//覆盖
        OutputStream osw = new FileOutputStream("src\\111",true);//追加数据

        osw.write(97);
        osw.write('b');
        //osw.write('累');乱码，一次只能写一个字节

        byte[] bytes = "\r\nnew byte[2]打赏".getBytes();
        osw.write(bytes);

        osw.write(bytes, 0, bytes.length);

        osw.close();

    }
}
